#define _CRT_SECURE_NO_WARNINGS
#include<stdio.h>

//int main()
//{
//	int year;
//	int mouth;
//	int day;
//	scanf("year-mouth-day", &year, &mouth, &day);
//	int a = 
//	return 0;
//}
//#include<stdio.h>

#include <stdio.h>

#include<stdio.h>

struct student
{
    int id;
    char name[20];
    int mem;
};
typedef struct student Student;
int main()
{
    Student students[20];
    int count = 0;
    for (int i = 0; i < 20; i++)
    {
        scanf("%d", &student[i].id);
        if (student[i].id != 0)
        {
            count++;
            scanf("%s %d", student[i].name, &student[i].mem);
        }
        else
            break;
    }
    for (int i = 0; i < count; i++)
    {
        printf("%d %s %d\n", student[i].id, student[i].name, student[i].mem);
    }
    return 0;
}